package com.bjsxt.chapter20_memento;

/**
 * @ClassName EmpMemento
 * @Description 雇员备忘录类
 * @Author 黑马程序员
 * @Date 17:15 2024/6/25
 * @Version 1.0
 **/
public class EmpMemento {

    private String name;

    private int age;

    private int salary;

    public EmpMemento(Emp emp) {
        this.name = emp.getName();
        this.age = emp.getAge();
        this.salary = emp.getSalary();
    }

    public EmpMemento() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
}
